/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.net.greenet.policybank.logic;
import cn.net.greenet.common.policy_service.PolicySupport;
import net.sf.json.JSONObject;

/**
 * 获取某类策略策略实例的最新版本号
 * @author liangdelin
 */
public class GetpolicyVersion {
    
    public String getVersion(String type, String instance)
    {
        //getHeadVersion(String type, String instance)
            long version= PolicySupport.getInstance().getApi().getHeadVersion(type, instance);
            JSONObject jo=new JSONObject();
            jo.put("version", version);
            return jo.toString();
    }
}
